package com.hello2;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(JavaConfig.class);
        UseFunctionService useFunctionService = annotationConfigApplicationContext.getBean(UseFunctionService.class);
        FunctionService functionService = annotationConfigApplicationContext.getBean(FunctionService.class);

        System.out.println(useFunctionService.sayHello());
        System.out.println(functionService.sayHello());
    }
}
